<?php
use think\facade\Route;

Route::miss(function () {
    $appRequest = request()->pathinfo();
    
    if ($appRequest === null) {
        $appName = '';
    } else {
        $appRequest = str_replace('//', '/', $appRequest);
        $appName = explode('/', $appRequest)[0] ?? '';
    }
    
    switch (strtolower($appName)) {
        case 'figure':
            return view(app()->getRootPath() . 'public' . DS . 'consume' . DS . 'index.html');
        default:
            return view(app()->getRootPath() . 'public' . DS . 'consume' . DS . 'index.html');
    }
});
